package com.qf.ssm.controller;

import com.qf.ssm.qo.CustomerReportQO;
import com.qf.ssm.result.ResponseResult;
import com.qf.ssm.service.CustomerReportService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author chengqiang
 * @Create 2024-01-05-17:35
 * @Description: 举报客户模块
 */
@RestController
@RequestMapping(("/customer/report"))
@Api(tags = "举报客户接口")
public class CustomerReportController {

    @Autowired
    private CustomerReportService customerReportService;

    @PostMapping("/save")
    @ResponseBody
    @ApiOperation("提交举报信息")
    @ApiImplicitParams({@ApiImplicitParam(name = "customerReportQO", value = "客户举报实体类")})
    @ApiResponses({@ApiResponse(code = 2000, message = "成功", response = Integer.class), @ApiResponse(code = 40000, message = "未知错误")})
    public ResponseResult<Integer> saveCustomerReport(@RequestBody CustomerReportQO customerReportQO){
        // System.out.println(1/0);
        return  ResponseResult.success(customerReportService.saveCustomerReportService(customerReportQO));
    }

}
